#include "Sort.h"

void TestInsertSort()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4};
	int n = sizeof(a) / sizeof(a[0]);
	InsertSort(a, n);
	PrintArray(a, n);

	ShellSort(a, n);
	PrintArray(a, n);
}

void TestSelectSort()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	SelectSort(a, n);
	PrintArray(a, n);
}

void TestBubbleSort()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	BubbleSort(a, n);
	PrintArray(a, n);
}

void TestQuickSort1()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	QuickSort1(a, 0, n-1);
	PrintArray(a, n);
}

void TestQuickSort2()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	QuickSort2(a, 0, n - 1);
	PrintArray(a, n);
}

void TestQuickSort()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	QuickSort(a, 0, n - 1);
	PrintArray(a, n);
}

void TestQuickSortNonR()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	QuickSortNonR(a,0, n-1);
	PrintArray(a, n);
}

void TestMergeSort()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	MergeSort(a, n);
	PrintArray(a, n);
}

void TestMergeSortNonR()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	MergeSortNonR(a, n);
	PrintArray(a, n);
}

void TestCountSort()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	CountSort(a, n);
	PrintArray(a, n);
}

void TestHeapSort()
{
	int a[] = { 5,1,9,7,0,6,3,8,2,4 };
	int n = sizeof(a) / sizeof(a[0]);
	PrintArray(a, n);

	HeapSort(a, n);
	PrintArray(a, n);
}

int main()
{
	TestHeapSort();
	return 0;
}